import requests

url = "http://ihrm-test.itheima.net/api/sys/login"
body = {
            "mobile": "13800000002",
            "password": "123456"}
resp = requests.post(url,json=body)
token = resp.json().get('data')
headers = {"Authorization":token}
print(headers)
url1 = "http://ihrm-test.itheima.net/api/sys/user"
body = {"username": "tom",
    "mobile": "13125686801",
    "timeOfEntry": "2019-07-01",
    "formOfEmployment": 1,
    "workNumber": "1322131",
    "departmentName": "开发部",
    "departmentId": "1066240656856453120",
    "correctionTime": "2019-11-30"}
resp = requests.post(url1,json=body,headers=headers)
print(resp.json())